import * as echartsApi from '@/api/echarts'

const state = {
  echartsList: {
    data: {},
    history: []
  }
}
const mutations = {
  SET_GETDEPARTMENT_LIST(state, newValue) {
    state.echartsList = newValue
  }
}

const actions = {
  async updateGetDepartmentStatisticsList({ commit }) {
    const res = await echartsApi.getDepartmentStatistics()
    console.log(res);
    commit('SET_GETDEPARTMENT_LIST', res)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
